package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class LocatorReferenceList {

    private int beginIndex;
    private int endIndex;
    private List<LocatorReference> locatorReferenceList;

    public LocatorReferenceList(List<LocatorReference> locatorReferenceList) {
        this.beginIndex = locatorReferenceList.get(0).getBeginIndex();
        this.endIndex = locatorReferenceList.get(locatorReferenceList.size() - 1).getEndIndex();
        this.locatorReferenceList = locatorReferenceList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return locatorReferenceList.size();
    }

    public LocatorReference get(int index) {
        return locatorReferenceList.get(index);
    }

}
